<?php

//加载GatewayClient。关于GatewayClient参见本页面底部介绍
require_once './GatewayClient/Gateway.php';
// GatewayClient 3.0.0版本开始要使用命名空间
use GatewayClient\Gateway;
Gateway::$registerAddress = '127.0.0.1:1238';
$message = $_POST;
$to_uid = $_POST['to_uid'];
$message['time'] = date("Y-m-d H:i:s");
print_r($message);
print_r($to_uid);
// 向任意uid的网站页面发送数据
//Gateway::sendToUid($to_uid, json_encode($message));
Gateway::sendToGroup(2, json_encode($message));